<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<th:block th:include="public::header"></th:block>
	<title th:text="${projectName}"></title>
</head>
<body>
	<th:block th:include="public::navbar"></th:block>
	<div class="container">
		<div class="panel panel-primary">
			<div class="panel-heading">修改密码</div>
			<div class="panel-body">
				<form th:object="${form}" th:action="@{/user/update_pwd}" method="post" id="form" class="form-horizontal">
					<div class="form-group">
						<label class="col-sm-3 control-label">新密码</label>
						<div class="col-sm-9">
							<input type="password" th:field="*{password}" class="form-control">
							<span class="help-block" th:errors="*{password}"></span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">确认密码</label>
						<div class="col-sm-9">
							<input type="password" th:field="*{confirmPassword}" class="form-control">
							<span class="help-block" th:errors="*{confirmPassword}"></span>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-9 col-sm-offset-3">
							<button type="submit" class="btn btn-primary btn-block">
								<span class="glyphicon glyphicon-ok"></span> 确认提交
							</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	<th:block th:include="public::footer"></th:block>
	<th:block th:include="public::jsfile"></th:block>
	<script th:inline="none">
	$(function(){
		var $form = $("#form");
		$(".help-block", $form).each(function(){
			var $span = $(this);
			$span.parents("div.form-group:eq(0)").addClass("has-error")
		});
	});
	</script>
</body>
</html>